<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
	/**
	 * CodeIgniter
	 *
	 * An open source application development framework for PHP 4.3.2 or newer
	 *
	 * @package		CodeIgniter
	 * @author		ExpressionEngine Dev Team
	 * @copyright	Copyright (c) 2008 - 2009, EllisLab, Inc.
	 * @license		http://codeigniter.com/user_guide/license.html
	 * @link		http://codeigniter.com
	 * @since		Version 1.0
	 * @filesource
	 */
	// ------------------------------------------------------------------------
	
	/**
	 * @package		CodeIgniter
	 * @subpackage	Libraries
	 * @author		AnhDT
	 */
	 
	abstract class st_menu_abstract_parser {
		
		protected $_loaded    = false;
		protected $_menu      = null;
				
		/**Thiết lập menu cho bộ phân tích menu*/
		public function setMenu(st_menu $_menu) {
			if ($_menu->getId() === '') {
				$_menu->setId();	
			}
			$this->_menu = & $_menu;
			return $this;
		}
		
		/**Lấy về menu*/
		public function & getMenu() {
			return $this->_menu;
		}
		
		/**Kiểm tra file xml nào đã được nạp chưa*/
		public function isLoaded() {
			return $this->_loaded;	
		}
		
		/**Hàm alias của outputHtml trong menu*/
		public function outputHtml($_renderType = '') {
			if (empty($this->_menu)) {
				return false;	
			}
			$this->_menu->outputHtml($_renderType);
			return $this;
		}
		
		/**Hàm nạp đè*/
		public function reset() {
			$this->_menu   = null;
			$this->_loaded = false;
			return $this;
		}
	}
?>
	